package com.zretc.demojparedis.service;


import com.zretc.demojparedis.entity.Question;
import org.springframework.data.domain.Page;

public interface QuestionService {
    public Page<Question> getQuestionByPage(String keywords, int page, int pagesize);


    /**
     * 修改question对象
     * @param question
     * @return
     */
    public Question updateQuestion(Question question);

    /**
     * 查询单个question对象
     * @param qid
     * @return
     */
    public Question getQuestionById(int qid);



    /**
     * 查询单个question对象,悲观锁的测试
     * @param qid
     * @return
     */
    public Question getQuestionByIdlock(int qid);
    public Question getQuestionByIdlock2(int qid);



}
